package com.ruoyi.teacher.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.teacher.domain.SysTeacher;
import com.ruoyi.teacher.mapper.SysTeacherMapper;
import com.ruoyi.teacher.service.ISysTeacherService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.validation.Validator;
import java.util.List;

/**
 * sysTeacherService业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-13
 */
@Service
public class SysTeacherServiceImpl implements ISysTeacherService
{
    private static final Logger log = LoggerFactory.getLogger(SysTeacherServiceImpl.class);
    @Autowired
    protected Validator validator;
    @Autowired
    private SysTeacherMapper sysTeacherMapper;

    /**
     * 查询sysTeacher
     * 
     * @param id sysTeacher主键
     * @return sysTeacher
     */
    @Override
    public SysTeacher selectSysTeacherById(Long id)
    {
        return sysTeacherMapper.selectSysTeacherById(id);
    }

    /**
     * 查询sysTeacher列表
     * 
     * @param sysTeacher sysTeacher
     * @return sysTeacher
     */
    @Override
    public List<SysTeacher> selectSysTeacherList(SysTeacher sysTeacher)
    {
        return sysTeacherMapper.selectSysTeacherList(sysTeacher);
    }

    /**
     * 新增sysTeacher
     * 
     * @param sysTeacher sysTeacher
     * @return 结果
     */
    @Override
    public int insertSysTeacher(SysTeacher sysTeacher)
    {
        return sysTeacherMapper.insertSysTeacher(sysTeacher);
    }

    /**
     * 修改sysTeacher
     * 
     * @param sysTeacher sysTeacher
     * @return 结果
     */
    @Override
    public int updateSysTeacher(SysTeacher sysTeacher)
    {
        return sysTeacherMapper.updateSysTeacher(sysTeacher);
    }

    /**
     * 批量删除sysTeacher
     * 
     * @param ids 需要删除的sysTeacher主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherByIds(String ids)
    {
        return sysTeacherMapper.deleteSysTeacherByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除sysTeacher信息
     * 
     * @param id sysTeacher主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherById(Long id)
    {
        return sysTeacherMapper.deleteSysTeacherById(id);
    }


}
